package pl.edu.agh.admin.api;

import pl.edu.agh.admin.core.CronTabManagerImpl;
import pl.edu.agh.admin.core.CronTabManagerMock;

/**
 * Klasa providera s�u�y do uzyskiwania singeltona jakim jest CronTabManagerImpl
 * @author gitman
 *
 */
public class CronTabManagerProvider {
	
	private static CronTabManager cronTabManager;
	
	public static CronTabManager getCronTabManager(){
		if(cronTabManager == null){
			// kiedy b�dzie zaimplementowane
			synchronized(CronTabManagerImpl.class){

				cronTabManager = new CronTabManagerImpl();
				//cronTabManager = new CronTabManagerMock();

			}
			
//			synchronized (CronTabManagerMock.class) {
//				cronTabManager = new CronTabManagerMock();
//			}
			
		}		
		return cronTabManager;
	}
}
